package com.example.myproject.client;

import com.google.gwt.user.client.ui.DockPanel;
import com.google.gwt.user.client.ui.HasAlignment;

/*************************************************************************
 * Class: MainScreen
 * Purpose: The Main Screen Dock Panel used to display 
 * 			the program
 * 
 * **********************************************************************/
public class MainScreen extends DockPanel {

	MainScreen()
	{	
		//create a list of modules
		Modules moduleList = new Modules();
		this.setSize("802px","602px");
		
		//set the alignment
	    this.setVerticalAlignment(HasAlignment.ALIGN_MIDDLE);
	    this.setHorizontalAlignment(HasAlignment.ALIGN_CENTER);
	    
	    //create a new module panel containing the module list
	    ModulePanel module= new ModulePanel(moduleList);
	    		
	    //add the module panel list to the main screen
		this.add(module.getSelection(), DockPanel.SOUTH);
		
		//align the screen
		this.setVerticalAlignment(HasAlignment.ALIGN_TOP);
		//add the module panel to main screen
		this.add(module, DockPanel.WEST);
		
		//display the module in the main screen panel
		this.add(module.getSelection().getDisplay(), DockPanel.WEST);		
		
	}
	
	
}
